import { Effect, Reducer } from "umi"


export type ModelState = {
    list: [];
    item: any;
}

export type TEffect = Record<'fetchList', Effect>
export type TReducer = Record<'setList' | 'setItem', Reducer<ModelState>>
export default <ModelType<ModelState, TEffect, TReducer>>{
    namespace:'demo',
    state: {
        list: [],
        item: {},
    },
    effects: {
        *fetchList({ }) { }
    },
    reducers: {
        setList(state) {
            return state;
         },
        setItem(state) { 
            return state;
        }
    }
}